//*************************************************************************\\
//***********		tdc_automata_drv_setcontrast_pre.h	***********\\
//*************************************************************************\\
//*************************************************************************\\
//*********** 		        UFPE/Cin - Greco		***********\\
//*********** 		 http://www.cin.ufpe.br/~greco 		***********\\
//***********							***********\\
//***********							***********\\
//*********** 		    By Rafael Melo Macieira		***********\\
//***********							***********\\
//***********		    E-mail: rmm2@cin.ufpe.br		***********\\
//*************************************************************************\\
//*************************************************************************\\
//**		 Automata for the temporal check of the			 **\\
//**  		drv_setcontrast service's pre condition			 **\\
//*************************************************************************\\

#ifndef TDC_AUTOMATA_DRV_SETCONTRAST_PRE_H
#define TDC_AUTOMATA_DRV_SETCONTRAST_PRE_H
#include "tdc_automata.h"
 
class TDC_Automata_drv_setcontrast_pre : public TDC_Automata{

 private:

  //unsigned int lcd_var_cmd;

  enum StateID {
    In,
    A,
    R
  };

  StateID currentState;

  static const StateID INITIAL_STATE = In;

  void printRejection(StateID stateID);
  int checkState(StateID stateID);
  int checkInitialState();
  StateID getNextState(StateID stateID);
  void refreshVariables(VarList *mainVarList);

 public:
  void reset();
  int runStep(bool access_type, VarList *mainVarList);
  TDC_Automata_drv_setcontrast_pre(VarList *mainVarList);
  //unsigned int lcd_var_cmd;
  //char access_type;

};

#endif
